/*
 * @Author: DengZhiJun 1726768643@qq.com
 * @Date: 2025-01-17 21:52:50
 * @LastEditors: dengzhijun 1726768643@qq.com
 * @LastEditTime: 2025-01-22 14:28:26
 * @FilePath: /Tools/Tool/include/Program.h
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#ifndef TOOLS_PROGRAM_H
#define TOOLS_PROGRAM_H

#include "Variant.h"

namespace Tool
{

class ExportAPI Program
{
public:
    Program();
    ~Program();
    const std::string &Path() const;
    bool Load(const std::string& path, VariantSerializeType type = VariantSerializeType::Binary);
    bool Save(const std::string& path, VariantSerializeType type = VariantSerializeType::Binary);
    Variant &GetVariant();
    Variant& operator [](const std::string &key);
    Variant& operator [](const char *key);

private:
    struct ProgramPrivater;
    std::unique_ptr<ProgramPrivater> m_privater;
};
}

#endif // PROGRAM_H
